package org.example.service.impl;

import org.example.dao.UserDao;
import org.example.service.UserService;

public class UserServiceImpl implements UserService {
    private UserDao userDao;

    public UserServiceImpl() {
        System.out.println("UserServiceImpl实例化");
    }

    public UserDao getUserDao() {
        return userDao;
    }

    /**
     * BeanFactory去调用该方法 从容器中获得userDao设置到此处
     */
    public void setUserDao(UserDao userDao) {
        System.out.println("BeanFactory去调用该方法获得userDao设置到此处" + userDao);
        this.userDao = userDao;
    }
}
